package com.douyuehan.doubao.wechatpay.service;

import com.douyuehan.doubao.wechatpay.model.dto.WechatParam;
import com.douyuehan.doubao.wechatpay.model.vo.MessageTo;
import com.douyuehan.doubao.wechatpay.model.vo.WechatJSConfigTo;
import com.douyuehan.doubao.wechatpay.model.vo.WechatUserTo;
import com.douyuehan.doubao.wechatpay.model.vo.WxPaymentTo;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.text.ParseException;

public interface WechatService {


    String getSPappid();

    WechatJSConfigTo getJSConfig(String url);

    MessageTo<WechatUserTo> getOpenId(String code);

    MessageTo<WxPaymentTo> wxPay(WechatParam param, HttpServletRequest request);

    String wechatNotify(HttpServletRequest request, HttpServletResponse response) throws IOException, ParseException;
}
